﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LibrarySystem
{
    public partial class TotalBillDay : Form
    {
        string User;
        AppManager LIB = new AppManager();
        public TotalBillDay(string Name)
        {
            InitializeComponent();
            User = Name;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void TotalBillDay_Load(object sender, EventArgs e)
        {
            label4.Text = User;
            label5.Text = DateTime.Now.Date.ToString("MM-dd-yyyy");
            LIB.FunSUM("SELECT SUM(الإجمالي_بعد_الخصم) FROM alssafa.dbo.Bill where اسم_المحاسب='" + label4.Text + "' AND التاريخ = '" + label5.Text + "'", label6);
            if (label6.Text == "")
            {
                label6.Text = "0";
            }

        }
    }
}
